import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      redirect: '/cookbook'
    },
    {
      path: '/cookbook',
      component: ()=>import('@/views/cookbook/index.vue'),
      meta: {
        title: '菜谱大全'
      }
    },
    {
      path: '/category',
      component: () => import('@/views/category/Category.vue'),
      meta: {
        title: '分类'
      }
    },
    {
      path: '/more',
      component: () => import('@/views/more/More.vue'),
      meta: {
        title: '更多'
      }
    }
  ]
})

export default router